/**
 * 
 */
package com.gkwave.action.service;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.gkwave.module.bean.BoardingLocationBean;
import com.gkwave.module.dao.BoardingLocationDAO;

/**
 * @author Administrator
 *
 */
@SuppressWarnings("serial")
public class TransportBoardingLocationService extends BaseService {

	/**
	 * 
	 */
	public TransportBoardingLocationService() {
		// TODO Auto-generated constructor stub
	}

	/* (non-Javadoc)
	 * @see com.gkwave.action.servelt.BaseServlet#processRequest(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
	 */
	@Override
	public void procesRequest(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		out = response.getWriter();
		String idRoute = request.getParameter("idRoute");
		System.out.println(idRoute);
		BoardingLocationDAO location = null;
		if(idRoute!=null){
			location = new BoardingLocationDAO();
			Integer id_Route = Integer.parseInt(idRoute);
			try {
				xmlResponse = new BoardingLocationBean().marsel(location.getBoardingLocationByRouteID(id_Route));
			} catch (NumberFormatException e) {
				// TODO: handle exception
				e.printStackTrace();
			}catch (Exception e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
		System.out.println(xmlResponse);
		out.println(xmlResponse);
	}

}
